package com.hirsi.common.core.validator.annotation;

import com.hirsi.common.core.validator.ChineseNameValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 中文姓名验证
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Constraint(validatedBy = ChineseNameValidator.class)
public @interface ChineseName {

    String message() default "请输入正确的中文姓名";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
